package com.lagou.rpc.consumer;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.proxy.RpcClientProxy;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ClientBootStrapApplication {
    public static void main(String[] args) {
        SpringApplication.run(ClientBootStrapApplication.class,args);
    }

    @Bean
    public IUserService iUserService(){
        IUserService userService = (IUserService) RpcClientProxy.createProxy(IUserService.class);
        return userService;
    }
}
